#ifndef _STREAMCOPIER_HPP_
#define _STREAMCOPIER_HPP_

#include "jhdefs.hpp"
#include "types.hpp"
#include <istream>
#include <ostream>

STREAM_NAMESPACE_BEGIN

class CStreamCopier
{
public:
	static std::streamsize copyStream(std::istream& istr, std::ostream& ostr, std::size_t bufferSize = 8192);
	static std::streamsize copyStreamUnbuffered(std::istream& istr, std::ostream& ostr);
	static std::streamsize copyToString(std::istream& istr, std::string& str, std::size_t bufferSize = 8192);

#if defined(JH_HAVE_INT64)
	static UInt64 copyStream64(std::istream& istr, std::ostream& ostr, std::size_t bufferSize = 8192);
	static UInt64 copyStreamUnbuffered64(std::istream& istr, std::ostream& ostr);
	static UInt64 copyToString64(std::istream& istr, std::string& str, std::size_t bufferSize = 8192);
#endif

};


STREAM_NAMESPACE_END

#endif
